﻿using System;

namespace HslCommunication
{
	/// <summary>
	/// 操作结果的泛型类，允许带十个用户自定义的泛型对象，推荐使用这个类
	/// </summary>
	/// <typeparam name="T1">泛型类</typeparam>
	/// <typeparam name="T2">泛型类</typeparam>
	/// <typeparam name="T3">泛型类</typeparam>
	/// <typeparam name="T4">泛型类</typeparam>
	/// <typeparam name="T5">泛型类</typeparam>
	/// <typeparam name="T6">泛型类</typeparam>
	/// <typeparam name="T7">泛型类</typeparam>
	/// <typeparam name="T8">泛型类</typeparam>
	/// <typeparam name="T9">泛型类</typeparam>
	/// <typeparam name="T10">泛型类</typeparam>
	// Token: 0x0200001E RID: 30
	public class OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> : OperateResult
	{
		/// <summary>
		/// 实例化一个默认的结果对象
		/// </summary>
		// Token: 0x060001F3 RID: 499 RVA: 0x00005A52 File Offset: 0x00003C52
		public OperateResult()
		{
		}

		/// <summary>
		/// 使用指定的消息实例化一个默认的结果对象
		/// </summary>
		/// <param name="msg">错误消息</param>
		// Token: 0x060001F4 RID: 500 RVA: 0x00005A5C File Offset: 0x00003C5C
		public OperateResult(string msg) : base(msg)
		{
		}

		/// <summary>
		/// 使用错误代码，消息文本来实例化对象
		/// </summary>
		/// <param name="err">错误代码</param>
		/// <param name="msg">错误消息</param>
		// Token: 0x060001F5 RID: 501 RVA: 0x00005A67 File Offset: 0x00003C67
		public OperateResult(int err, string msg) : base(err, msg)
		{
		}

		/// <summary>
		/// 用户自定义的泛型数据1
		/// </summary>
		// Token: 0x17000076 RID: 118
		// (get) Token: 0x060001F6 RID: 502 RVA: 0x00007A3D File Offset: 0x00005C3D
		// (set) Token: 0x060001F7 RID: 503 RVA: 0x00007A45 File Offset: 0x00005C45
		public T1 Content1 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据2
		/// </summary>
		// Token: 0x17000077 RID: 119
		// (get) Token: 0x060001F8 RID: 504 RVA: 0x00007A4E File Offset: 0x00005C4E
		// (set) Token: 0x060001F9 RID: 505 RVA: 0x00007A56 File Offset: 0x00005C56
		public T2 Content2 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据3
		/// </summary>
		// Token: 0x17000078 RID: 120
		// (get) Token: 0x060001FA RID: 506 RVA: 0x00007A5F File Offset: 0x00005C5F
		// (set) Token: 0x060001FB RID: 507 RVA: 0x00007A67 File Offset: 0x00005C67
		public T3 Content3 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据4
		/// </summary>
		// Token: 0x17000079 RID: 121
		// (get) Token: 0x060001FC RID: 508 RVA: 0x00007A70 File Offset: 0x00005C70
		// (set) Token: 0x060001FD RID: 509 RVA: 0x00007A78 File Offset: 0x00005C78
		public T4 Content4 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据5
		/// </summary>
		// Token: 0x1700007A RID: 122
		// (get) Token: 0x060001FE RID: 510 RVA: 0x00007A81 File Offset: 0x00005C81
		// (set) Token: 0x060001FF RID: 511 RVA: 0x00007A89 File Offset: 0x00005C89
		public T5 Content5 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据6
		/// </summary>
		// Token: 0x1700007B RID: 123
		// (get) Token: 0x06000200 RID: 512 RVA: 0x00007A92 File Offset: 0x00005C92
		// (set) Token: 0x06000201 RID: 513 RVA: 0x00007A9A File Offset: 0x00005C9A
		public T6 Content6 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据7
		/// </summary>
		// Token: 0x1700007C RID: 124
		// (get) Token: 0x06000202 RID: 514 RVA: 0x00007AA3 File Offset: 0x00005CA3
		// (set) Token: 0x06000203 RID: 515 RVA: 0x00007AAB File Offset: 0x00005CAB
		public T7 Content7 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据8
		/// </summary>
		// Token: 0x1700007D RID: 125
		// (get) Token: 0x06000204 RID: 516 RVA: 0x00007AB4 File Offset: 0x00005CB4
		// (set) Token: 0x06000205 RID: 517 RVA: 0x00007ABC File Offset: 0x00005CBC
		public T8 Content8 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据9
		/// </summary>
		// Token: 0x1700007E RID: 126
		// (get) Token: 0x06000206 RID: 518 RVA: 0x00007AC5 File Offset: 0x00005CC5
		// (set) Token: 0x06000207 RID: 519 RVA: 0x00007ACD File Offset: 0x00005CCD
		public T9 Content9 { get; set; }

		/// <summary>
		/// 用户自定义的泛型数据10
		/// </summary>
		// Token: 0x1700007F RID: 127
		// (get) Token: 0x06000208 RID: 520 RVA: 0x00007AD6 File Offset: 0x00005CD6
		// (set) Token: 0x06000209 RID: 521 RVA: 0x00007ADE File Offset: 0x00005CDE
		public T10 Content10 { get; set; }

		/// <summary>
		/// 返回一个检查结果对象，可以进行自定义的数据检查。<br />
		/// Returns a check result object that allows you to perform custom data checks.
		/// </summary>
		/// <param name="check">检查的委托方法</param>
		/// <param name="message">检查失败的错误消息</param>
		/// <returns>如果检查成功，则返回对象本身，如果失败，返回错误信息。</returns>
		// Token: 0x0600020A RID: 522 RVA: 0x00007AE8 File Offset: 0x00005CE8
		public OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Check(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool> check, string message = "All content data check failed")
		{
			bool flag = !base.IsSuccess;
			OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> result;
			if (flag)
			{
				result = this;
			}
			else
			{
				bool flag2 = check.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10);
				if (flag2)
				{
					result = this;
				}
				else
				{
					result = new OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(message);
				}
			}
			return result;
		}

		/// <summary>
		/// 返回一个检查结果对象，可以进行自定义的数据检查。<br />
		/// Returns a check result object that allows you to perform custom data checks.
		/// </summary>
		/// <param name="check">检查的委托方法</param>
		/// <returns>如果检查成功，则返回对象本身，如果失败，返回错误信息。</returns>
		// Token: 0x0600020B RID: 523 RVA: 0x00007B5C File Offset: 0x00005D5C
		public OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Check(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult> check)
		{
			bool flag = !base.IsSuccess;
			OperateResult<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> result;
			if (flag)
			{
				result = this;
			}
			else
			{
				OperateResult operateResult = check.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10);
				bool flag2 = !operateResult.IsSuccess;
				if (flag2)
				{
					result = OperateResult.CreateFailedResult<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(operateResult);
				}
				else
				{
					result = this;
				}
			}
			return result;
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x0600020C RID: 524 RVA: 0x00007BDC File Offset: 0x00005DDC
		public OperateResult Then(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10) : this;
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。
		/// </summary>
		/// <typeparam name="TResult">泛型参数</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x0600020D RID: 525 RVA: 0x00007C38 File Offset: 0x00005E38
		public OperateResult<TResult> Then<TResult>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult<TResult>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10) : OperateResult.CreateFailedResult<TResult>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x0600020E RID: 526 RVA: 0x00007C98 File Offset: 0x00005E98
		public OperateResult<TResult1, TResult2> Then<TResult1, TResult2>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult<TResult1, TResult2>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10) : OperateResult.CreateFailedResult<TResult1, TResult2>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x0600020F RID: 527 RVA: 0x00007CF8 File Offset: 0x00005EF8
		public OperateResult<TResult1, TResult2, TResult3> Then<TResult1, TResult2, TResult3>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult<TResult1, TResult2, TResult3>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x06000210 RID: 528 RVA: 0x00007D58 File Offset: 0x00005F58
		public OperateResult<TResult1, TResult2, TResult3, TResult4> Then<TResult1, TResult2, TResult3, TResult4>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult<TResult1, TResult2, TResult3, TResult4>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x06000211 RID: 529 RVA: 0x00007DB8 File Offset: 0x00005FB8
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5> Then<TResult1, TResult2, TResult3, TResult4, TResult5>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <typeparam name="TResult6">泛型参数六</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x06000212 RID: 530 RVA: 0x00007E18 File Offset: 0x00006018
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6> Then<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <typeparam name="TResult6">泛型参数六</typeparam>
		/// <typeparam name="TResult7">泛型参数七</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x06000213 RID: 531 RVA: 0x00007E78 File Offset: 0x00006078
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7> Then<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <typeparam name="TResult6">泛型参数六</typeparam>
		/// <typeparam name="TResult7">泛型参数七</typeparam>
		/// <typeparam name="TResult8">泛型参数八</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x06000214 RID: 532 RVA: 0x00007ED8 File Offset: 0x000060D8
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8> Then<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <typeparam name="TResult6">泛型参数六</typeparam>
		/// <typeparam name="TResult7">泛型参数七</typeparam>
		/// <typeparam name="TResult8">泛型参数八</typeparam>
		/// <typeparam name="TResult9">泛型参数九</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x06000215 RID: 533 RVA: 0x00007F38 File Offset: 0x00006138
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9> Then<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9>(this);
		}

		/// <summary>
		/// 指定接下来要做的是内容，当前对象如果成功，就返回接下来的执行结果，如果失败，就返回当前对象本身。<br />
		/// Specify what you want to do next, return the result of the execution of the current object if it succeeds, and return the current object itself if it fails.
		/// </summary>
		/// <typeparam name="TResult1">泛型参数一</typeparam>
		/// <typeparam name="TResult2">泛型参数二</typeparam>
		/// <typeparam name="TResult3">泛型参数三</typeparam>
		/// <typeparam name="TResult4">泛型参数四</typeparam>
		/// <typeparam name="TResult5">泛型参数五</typeparam>
		/// <typeparam name="TResult6">泛型参数六</typeparam>
		/// <typeparam name="TResult7">泛型参数七</typeparam>
		/// <typeparam name="TResult8">泛型参数八</typeparam>
		/// <typeparam name="TResult9">泛型参数九</typeparam>
		/// <typeparam name="TResult10">泛型参数十</typeparam>
		/// <param name="func">等待当前对象成功后执行的内容</param>
		/// <returns>返回整个方法链最终的成功失败结果</returns>
		// Token: 0x06000216 RID: 534 RVA: 0x00007F98 File Offset: 0x00006198
		public OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9, TResult10> Then<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9, TResult10>(Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, OperateResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9, TResult10>> func)
		{
			return base.IsSuccess ? func.Invoke(this.Content1, this.Content2, this.Content3, this.Content4, this.Content5, this.Content6, this.Content7, this.Content8, this.Content9, this.Content10) : OperateResult.CreateFailedResult<TResult1, TResult2, TResult3, TResult4, TResult5, TResult6, TResult7, TResult8, TResult9, TResult10>(this);
		}
	}
}
